//
//  NoDataView.m
//  JXC
//
//  Created by yike on 16/6/2.
//  Copyright © 2016年 厦门乙科网络公司. All rights reserved.
//

#import "NoDataView.h"

@implementation NoDataView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        self.view = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"没有相关订单"]];
        [self addSubview:self.view];
        
        self.label = [[UILabel alloc]initWithFrame:CGRectZero];
        self.label.text = @"暂无数据";
        self.label.textColor = [PublicMethod colorWithHexString:@"#666666" andAlpha:1];
        self.label.textAlignment = 1;
        if (IsPad) {
            self.label.font = [UIFont systemFontOfSize:16*PadZitiRate];
        }else{
        self.label.font = [UIFont systemFontOfSize:16*ZitiRate];
        }
        [self addSubview:self.label];
        
    }
    return self;
}
- (void)setUpName:(NSString *)name{
    self.label.text = name;
}
- (void)setUpHeaderViewHeight:(CGFloat)headerHeight{
   self.view.frame = CGRectMake(self.frame.size.width/2-50*WidthRate, headerHeight+((self.frame.size.height-headerHeight)/2-120*HeightRate), 100*WidthRate, 100*WidthRate);
    self.label.frame = CGRectMake(self.frame.size.width/2-177.5*WidthRate, headerHeight+((self.frame.size.height-headerHeight)/2), 355*WidthRate, 18*HeightRate);
}
@end
